<template>
	<view class="eva-section">
		<view class="eva-box" v-for="(item, index) in list" :key="index" @tap.stop="itemCommonClick(item)">
			<view class="eva-top ">
				<view class="row center">
					<image class="img" :src="item.icon" mode="aspectFill"></image>
					<view class="">
						<view class="name">{{ item.name }}</view>
						<view class="adtime">{{item.createDate | formatTime}}</view>
					</view>
				</view>
			</view>
			<view class="eva-content">
				<view class="con">{{item.content }}</view>
		<!-- 		beId: "02bef3fee43d4d1f9ecb09c81cf03062"
				beName: "Z@way"
				content: "回复的 沙发"
				icon: "http://47.94.10.78:8080/userfiles/null/fj/app/2021/8/eue49nxRAAEAb572cd70e3a38d9ae647126db375bf1e.jpg"
				id: "e76273993d574405b07e2fbf838b0fde"
				messageId: "68821acc7a6b404f8e311aa3ae336789"
				name: "Z@way"
				pic: "http://47.94.10.78:8080/userfiles/null/fj/app/2021/8/eue49nxRAAEAb572cd70e3a38d9ae647126db375bf1e.jpg"
				uid: "02bef3fee43d4d1f9ecb09c81cf03062" -->
			</view>
			<view hover-class="hover-opacity" v-if="item.atMessageCommentReplyList.length!=0">
				<view class="eva-more">
					<u-read-more
						ref="uReadMore"
						:font-size="24"
						close-text="更多"
						:toggle="true"
						:shadow-style="shadowStyle"
						:show-height="200"
						text-indent="0"
					>
						<view class="eva-more-item" v-for="(v,k) in item.atMessageCommentReplyList" :key="k">
							<text>{{v.name}}回复{{v.beName}}：</text>
							<text>
								{{v.content}}
							</text>
						</view>
					</u-read-more>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
export default {
	props: {
		list: {
			type: Array
		},
		hasImage: {
			type: Boolean,
			default: false
		}
	},
	data() {
		return {
			shadowStyle: {}
		};
	},
	filters: {
		commonLength(value) {
			return value.length;
		}
	},
	methods: {
		itemCommonClick(item) {
			if(!uni.getStorageSync('uid')){
				this.navTo("/pages/public/author");
				return
			}
			this.$emit("click", item);
		},
		ImgDetails(k, n) {
			uni.previewImage({
				urls: this.list[k].images,
				current: this.list[k].images[n]
			});
		}
	}
};
</script>

<style scoped lang="scss">
.eva-more {
	padding: 14upx;
	background: #f8f8f8;
	border-radius: 10upx;
}
.eva-more-item {
	display: table;
	text {
		font-size: 24upx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #0e85e1;
		display: inline;
	}
}
.adtime {
	font-size: 22upx;
	color: #999999;
	padding: 20upx 0;
}
/* 评价 */
.eva-section {
	display: flex;
	flex-direction: column;
}

.eva-box {
	display: flex;
	flex-direction: column;
	margin-bottom: 20upx;
	background-color: #ffffff;
	.eva-top {
		display: flex;
		justify-content: space-between;
		align-items: center;
		// margin-top: 20upx;
		.img {
			width: 90upx;
			height: 90upx;
			border-radius: 50%;
			margin-right: 20upx;
		}
		.name {
			color: #000000;
			font-size: 30upx;
			font-weight: bold;
		}
	}

	.eva-content {
		margin: 10upx 0;

		.con {
			color: #666666;
			font-size: 24upx;
			padding: 10upx;
		}

		.eva-img-con {
			display: flex;
			align-items: center;
			padding: 10upx 0;

			.img {
				width: 160upx;
				height: 160upx;
				margin-right: 20upx;
			}
		}
	}
}
</style>
